﻿@{
    ViewBag.Title = "home";
    Layout = "~/Views/_shared/AdminLayout.cshtml";
}
@section script{
    window.onload=function(){
        FMAPortalAdmin.services.getAllFileItem("");
    }
}
<div class="box with-toolbar">
    <div class="top-toolbar">
        <button class="add-pages" data-toggle="modal" data-target="#addPagesModal"><i></i>Sayfa Ekle</button>
        <button class="add-folder"><i></i>Klasör Ekle</button>
        <button class="edit"><i></i>Düzenle</button>
        <button class="delete"><i></i>Sil</button>
        <button class="download"><i></i>İndir</button>
        <button class="upload"><i></i>Yükle</button>
    </div>
    <div class="box-body">
        <div class="row">
            <div class="col-xs-12">
                <table class="file-explorer-table">
                    <thead>
                        <tr>
                            <th class="tool"></th>
                            <th class="tool">Menu</th>
                            <th class="tool">Yetki</th>
                            <th class="tool">Yayında</th>
                            <th class="name-container">Dosya Adı</th>
                        </tr>
                    </thead>
                    <tbody class="file-explorer"></tbody>
                </table>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="addPagesModal" tabindex="-1" role="dialog" aria-labelledby="addPagesModalTitle" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <form action="/services/savePage" method="post">
                    <input class="" type="hidden" name="pagePath" id="pagePath"/>
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="addPagesModalTitle">Sayfa Ekle</h4>
                    </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="form-submit-message"></div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-12 col-sm-6">
                                <div class="form-group">
                                    <label id="pageNameLabel" for="pageName">Sayfa Adı</label>
                                    <input class="" type="text" name="pageName" id="pageName" aria-labelledby="pageNameLabel" defaultvalue="" required />
                                </div>
                                <div class="form-group">
                                    <label id="pageTitleLabel" for="pageTitle">Sayfa Başlığı</label>
                                    <input class="" type="text" name="pageTitle" id="pageTitle" aria-labelledby="pageTitleLabel" defaultvalue="" required />
                                </div>
                                <div class="form-group">
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-6">
                                            <div class="form-group">
                                                <label id="isMenuPageLabel" for="isMenuPage">Menü</label>
                                                <input type="checkbox" name="isMenuPage" id="isMenuPage" aria-labelledby="isMenuPageLabel" defaultvalue="false">
                                            </div>
                                        </div>
                                        <div class="col-xs-12 col-sm-6">
                                            <div class="form-group">
                                                <label id="isActivePageLabel" for="isActivePage">Yayınla</label>
                                                <input type="checkbox" name="isActivePage" id="isActivePage" aria-labelledby="isActivePageLabel" defaultvalue="false" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12 col-sm-6">
                                <div class="form-group">
                                    <label id="pageTagLabel" for="pageTag">Sayfa Etiketleri</label>
                                    <textarea name="pageTag" id="pageTag" aria-labelledby="pageTagLabel" defaultvalue=""></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn-default" data-dismiss="modal">İptal</button>
                        <button type="button" class="btn-primary" onclick="FMAPortalAdmin.functions.pageSave(form);">Kaydet</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
